Skip to content

fix(mac): make Start say why it failed, and copy the password without a flash - #235

Merged
dvcdsys merged 1 commit into
developfrom
fix/start-without-database
Aug 10, 2026
Merged

fix(mac): make Start say why it failed, and copy the password without a flash#235
dvcdsys merged 1 commit into
developfrom
fix/start-without-database

Conversation

@dvcdsys

@dvcdsys dvcdsys commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Both found by testing #234 rather than by reading it.

Start did nothing after the database was deleted

Retiring the bootstrap password was right, but it turned a silent recreation
into a silent refusal. With the email still present and the password gone, an
empty database is the half-configured case bootstrap.go rejects outright:

bootstrap auth: incomplete bootstrap configuration:
CIX_BOOTSTRAP_ADMIN_EMAIL is set but CIX_BOOTSTRAP_ADMIN_PASSWORD is empty.

The server exited in milliseconds and the menu returned to "Stopped" — from the
outside, a Start button that does nothing. needsFirstRun already knew, but it
is only consulted at launch; an app already running never asked again.

Start now checks before starting and offers to set up again. It also verifies
the server outlived the start — launchctl answers for having spawned the
process, not for it surviving — and when it did not, shows the server's own
message, trimmed to the last few lines with a pointer to the log.

For the record: that refusal is guarded by count == 0, so retiring the
password never affects a start against an intact database.

Copy Password flashed the window

display dialog is modal and returns only when it closes, so a copy button
meant closing the window and opening it again — a blink.

The password is now on the clipboard before the window appears, and the
message says so. That removes the flash and the click at once, and there is
nothing to be coy about: this is a password the app generated seconds ago and
is showing on purpose, and the clipboard is where it was going anyway.

Tests

lastServerError — reports the tail, drops blank lines, stays bounded, and
still says something when there is no log at all.

🤖 Generated with Claude Code

… a flash

Two problems from testing the previous change.

**Start did nothing after the database was deleted.** Removing the bootstrap
password was right, but it turned a silent recreation into a silent refusal:
with the email still present and the password gone, an empty database is the
half-configured case bootstrap.go rejects outright ("CIX_BOOTSTRAP_ADMIN_EMAIL
is set but CIX_BOOTSTRAP_ADMIN_PASSWORD is empty"). The server exited in
milliseconds and the menu went back to "Stopped" — indistinguishable from a
button that does nothing. needsFirstRun already knew, but only at launch; a
running app never asked again.

Start now checks before starting, and offers to set up again rather than
spawning a process that cannot survive. It also verifies the server outlived
the start: launchctl reports having spawned it, not having kept it, so a
process that rejects its own configuration used to disappear without a word.
When that happens the server's own message is shown, trimmed to the last few
lines with a pointer to the log.

Worth stating for the record: the refusal is guarded by `count == 0`, so
retiring the password never affects a start against an intact database.

**Copy Password flashed the window.** AppleScript's `display dialog` is modal
and returns only when it closes, so a copy button meant closing the window and
opening it again — on screen, a blink. The password is now on the clipboard
before the window appears and the message says so, which removes the flash and
the click together. There is nothing to be coy about: this is a password the
app generated seconds ago and is showing on purpose.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dvcdsys
dvcdsys merged commit 450a17f into develop Aug 10, 2026
2 checks passed
@dvcdsys
dvcdsys deleted the fix/start-without-database branch August 10, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant